import KZJRequest from '../../index'
import { TRequestDefaultResult } from '../../type'

enum music {
  NewSong = '/top/song', //获取最新歌曲
  NewAlbum = '/top/album' // 获取最新专辑
}

export function getNewSongsList(type = 0) {
  return KZJRequest.get<TRequestDefaultResult>({
    url: music.NewSong,
    showLoading: true,
    params: {
      type
    }
  })
}

export function getNewAlbumsList(area: string, limit = 30, offset = 0) {
  return KZJRequest.get<TRequestDefaultResult>({
    url: music.NewAlbum,
    showLoading: true,
    params: {
      area,
      limit,
      offset
    }
  })
}
